package com.lyl.springcloud.server;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author lylbell
 * @date 2021-05-28 16:55
 */
@Component
//从CLOUD-PROVIDER-PAYMENTHYSTIX中查找，若出现问题，则进行服务降级，从PaymentFallbackService中找。
//@FeignClient(value = "CLOUD-PROVIDER-PAYMENTHYSTIX",fallback = PaymentFallbackService.class)
@FeignClient(value = "CLOUD-PROVIDER-PAYMENTHYSTIX")
public interface PaymentFeignServer {


    @GetMapping("/payment/hystrix/ok/{id}")
    String paymentInfo_ok(@PathVariable("id") Integer id);


    @GetMapping("/payment/hystrix/timeout/{id}")
    String paymentInfo_timeout(@PathVariable("id") Integer id);
}
